/**
 * "Visual Paradigm: DO NOT MODIFY THIS FILE!"
 * 
 * This is an automatic generated file. It will be regenerated every time 
 * you generate persistence class.
 * 
 * Modifying its content may cause the program not work, or your work may lost.
 */

/**
 * Licensee: DuKe TeAm
 * License Type: Purchased
 */
package orm;

import java.io.Serializable;
public class Tienda implements Serializable {
	public Tienda() {
	}
	
	private java.util.Set this_getSet (int key) {
		if (key == orm.ORMConstants.KEY_TIENDA_SUCURSAL) {
			return ORM_sucursal;
		}
		
		return null;
	}
	
	private void this_setOwner(Object owner, int key) {
		if (key == orm.ORMConstants.KEY_TIENDA_EMPRESAIDEMPRESA) {
			this.empresaidEmpresa = (orm.Empresa) owner;
		}
	}
	
	org.orm.util.ORMAdapter _ormAdapter = new org.orm.util.AbstractORMAdapter() {
		public java.util.Set getSet(int key) {
			return this_getSet(key);
		}
		
		public void setOwner(Object owner, int key) {
			this_setOwner(owner, key);
		}
		
	};
	
	private Integer idTienda;
	
	private String nombreTienda;
	
	private String direccionCentral;
	
	private Integer rol;
	
	private Integer RUT;
	
	private orm.Empresa empresaidEmpresa;
	
	private java.util.Set ORM_sucursal = new java.util.HashSet();
	
	private void setIdTienda(int value) {
		setIdTienda(new Integer(value));
	}
	
	private void setIdTienda(Integer value) {
		this.idTienda = value;
	}
	
	public Integer getIdTienda() {
		return idTienda;
	}
	
	public Integer getORMID() {
		return getIdTienda();
	}
	
	public void setNombreTienda(String value) {
		this.nombreTienda = value;
	}
	
	public String getNombreTienda() {
		return nombreTienda;
	}
	
	public void setDireccionCentral(String value) {
		this.direccionCentral = value;
	}
	
	public String getDireccionCentral() {
		return direccionCentral;
	}
	
	public void setRol(int value) {
		setRol(new Integer(value));
	}
	
	public void setRol(Integer value) {
		this.rol = value;
	}
	
	public Integer getRol() {
		return rol;
	}
	
	public void setRUT(int value) {
		setRUT(new Integer(value));
	}
	
	public void setRUT(Integer value) {
		this.RUT = value;
	}
	
	public Integer getRUT() {
		return RUT;
	}
	
	public void setEmpresaidEmpresa(orm.Empresa value) {
		if (empresaidEmpresa != null) {
			empresaidEmpresa.tienda.remove(this);
		}
		if (value != null) {
			value.tienda.add(this);
		}
	}
	
	public orm.Empresa getEmpresaidEmpresa() {
		return empresaidEmpresa;
	}
	
	/**
	 * This method is for internal use only.
	 */
	public void setORM_EmpresaidEmpresa(orm.Empresa value) {
		this.empresaidEmpresa = value;
	}
	
	private orm.Empresa getORM_EmpresaidEmpresa() {
		return empresaidEmpresa;
	}
	
	private void setORM_Sucursal(java.util.Set value) {
		this.ORM_sucursal = value;
	}
	
	private java.util.Set getORM_Sucursal() {
		return ORM_sucursal;
	}
	
	public final orm.SucursalSetCollection sucursal = new orm.SucursalSetCollection(this, _ormAdapter, orm.ORMConstants.KEY_TIENDA_SUCURSAL, orm.ORMConstants.KEY_SUCURSAL_TIENDAIDTIENDA, orm.ORMConstants.KEY_MUL_ONE_TO_MANY);
	
	public String toString() {
		return String.valueOf(getIdTienda());
	}
	
}
